Skip to content

Switch to Maplibre and update DataSF datasets#2

Open
emilyhorsman wants to merge 10 commits intoDataSF:masterfrom
emilyhorsman:master
Open

Switch to Maplibre and update DataSF datasets#2
emilyhorsman wants to merge 10 commits intoDataSF:masterfrom
emilyhorsman:master

Conversation

@emilyhorsman
Copy link
Copy Markdown

Background

This repository has not been updated in 6 years. The publicly hosted datasf.org app isn't working because:

  1. It's using mapbox-gl-js with an expired access token.
  2. A lot of the DataSF fbf's have changed in 6 years.

This PR

This PR isn't perfect but it successfully gets things working.

  1. Switches mapbox to maplibre to avoid needing an access token.
  2. Updates the datasets it uses in the Socrata calls as best as possible.
  3. Switches the geocoding to Nominatim.

Example

Screenshot 2025-06-19 at 9 21 08 AM

My fork is hosted on GitHub Pages here.

emilyhorsman and others added 10 commits June 18, 2025 18:33
- Add check for buildings-2d layer existence before querying to prevent errors on initial load
- Fix wktFromPoints to use dynamic geometry field name instead of hardcoded 'location'
- Update landuse dataset ID from a2rp-pwkh to fdfd-xptc (2023 dataset)
- Update zoning dataset ID from 66e8-ui2b to 3i4a-hu95
- Add error handling for failed dataset fetches to return empty arrays
- Handle missing landuse and zoning data gracefully in UI
- Fix geocoder result handling for OpenStreetMap Nominatim format
- Add null checks in wktFromPolygon to prevent undefined errors
- Add field name fallbacks for zoning (districtname, district_name, district)
- Add field name fallbacks for landuse (yrbuilt, year_built, etc.)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update planning datasets to use new split datasets:
  - Planning projects: qvu5-m3a2
  - Planning non-projects: y673-d69b
- Change planning field names to uppercase (RECORD_ID, PROJECT_ADDRESS, etc.)
- Switch from geometry-based to parcel-based queries for planning datasets
- Replace missing date fields with "N/A" placeholders
- Fix property tax roll field mappings (fixture_value, closed_roll_fiscal_year)
- Remove geometry field from DBI complaints dataset
- Update energy dataset from 75rg-imyz to 96ck-qcfe with new field mappings
- Remove debug console.log statements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update parcel date fields to use date_map_add instead of deprecated rec_add
- Apply formatDate() function to display dates as YYYY-MM-DD
- Remove "unknown date" text when date is missing
- Check for date_map_drop field for dropped parcels

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Change 'open-date' alias to 'open_date' to fix SoQL syntax error
- Update additional dataset IDs and field mappings missed in previous commits
- Fix fire inspections typo and planning field inconsistencies

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Change planning record status field from 'record_status' to 'status'
- Change date field from 'open_date' to 'status_date' for both planning datasets

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add proper padding to prevent magnifying glass from overlapping text
- Position search icon and clear button correctly
- Ensure icons don't overlap with placeholder or typed text

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…update-datasets

Switch to MapLibre and update dataset IDs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant